let app = getApp()
Component({
    properties: {
      index:{type:Number},
      value:{type:Number},
      spec_id_group:{type:String},
      type:{
        type:String,
       },
      list:{
        type:Array,
        observer: function(newVal, oldVal) {
          this.update()
        }
      }
      },
      data:{
        
      },
    lifetimes: {
        attached: function () {
         
         }
      },
    methods: {
      changevalue:function(e){
        this.setData({
          value:e.currentTarget.dataset.value
        })
        var spec={};
        spec['index']=this.data.index;
        spec['value']=e.currentTarget.dataset.value;
        this.triggerEvent ('get_spec',spec)
      },
      update:function(){
        var that=this
        this.setData({
          list:that.data.list
        })
      }
    }
});
